package win.skxe07.quartz;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;

@Configuration
public class QuartzConfig {

	@Bean
    public SchedulerFactoryBean schedulerFactoryBean(){  
        SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean();  
        schedulerFactoryBean.setSchedulerName("AAAAAAAAAAAAAAAAAAA");
        Resource r = new ClassPathResource("quartz.properties");
        schedulerFactoryBean.setConfigLocation(r);//设置自定义配置文件
        
        return schedulerFactoryBean;   
    }	
	
}
